<template>
	<view class="spellGroup">
		<u-navbar back-text="支付结果" :custom-back="goOrderDetail" :back-text-style="textStyle" back-icon-color="#000000" style="font-weight: bold;font-family: PingFang SC;"></u-navbar>
		<view class="middle">
			<view class="icon">
				<image src="https://beedao.oss-cn-beijing.aliyuncs.com/cabf44fa68bc4301aa47757c6e326777.png" mode="">
				</image>
				<view class="banben">
					<text>已加入，离成团还差</text>
					<text style="color: #FCC800;">1</text>
					<text>人</text>
				</view>
			</view>
			<view style="display: flex;align-items: center;justify-content: center;margin-top: 50rpx;">
				<view style="position: relative;">
					<image style="width: 120rpx;height: 120rpx;border-radius: 50%;" 
					:src="orderDetails.groupLeaderPortrait?orderDetails.groupLeaderPortrait:'https://beedao.oss-cn-beijing.aliyuncs.com/9ca4c3b0d041409e9e4c3d41b896430b.png' " mode=""></image>
					<view style="font-size: 26rpx; position: absolute;top: 0;right: -38rpx;background-color: #FCC800;padding: 2rpx 12rpx;border-radius:30rpx;color: #FFFFFF;">团长</view>
				</view>
				<view style="display: flex;align-items: center;justify-content: center;">
					<view style="width: 180rpx;height: 1rpx;background-color:#FCC800 ;"></view>
				</view>
				<view>
					<image style="width: 120rpx;height: 120rpx;border-radius: 50%;" src="https://beedao.oss-cn-beijing.aliyuncs.com/e0f8f07f8bff415f94594bba5b47d3bf.png" mode=""></image>
				</view>
			</view>
			<view style="width: 100%;text-align: center;font-size: 32rpx;margin-top: 40rpx;">
				请在24小时内拼团成功
			</view>
			<view style="margin-top: 40rpx;text-align: center;">
				<view>
					<button type="primary" open-type="share" style="font-size: 32rpx; width: 272rpx; padding: 0rpx 24rpx;border-radius: 16rpx;background-color: #FCC800;color: #323332;">邀请好友拼团</button>
				</view>
			</view>
		</view>


	</view>
</template>

<script>
	export default {
		data() {
			return {
				orderId:"",
				orderDetails:{},
				img:'',
			};
		},
		onLoad(option) {
			this.orderId = option.orderId;
			this.img=option.img;
			this.orderDetail(option.orderId)
		},
		methods: {
			//去订单详情
			goOrderDetail(){
				uni.redirectTo({
					url:'../order/orderDetail?orderId='+this.orderId
				})
			},
			// 分享设置参数
			onShareAppMessage(res) {
				if (res.from === 'button') {			
				}
				return {
					title: "平台补贴 日常保洁（服务类型）拼团下单，就差1人拼成。",
					imageUrl:this.img,
					path:'/pageageA/placeOrder/appointment?orderId='+this.orderId+'&groupType='+2
				};
			},
			//订单详情
			orderDetail(id) {
				let _this = this;
				let opts = {
					way: true, //true JSON请求；false 表单请求
					method: 'post',
					url: 'unit-orders/pay/success/info'
				};
				let data = {
					orderId: id
				};
				_this.http.httpTokenRequest(opts, data).then(res => {
					_this.orderDetails = res.data;

				});
			},
		}
	};
</script>

<style scoped lang="scss">
	.spellGroup {
		background-color: white;
		font-family: PingFang SC;
	}

	.icon {
		padding-top: 60rpx;
		text-align: center;
	}

	.icon image {
		width: 180rpx;
		height: 180rpx;
	}

	.banben {
		font-family: PingFang SC;
		color: #3f3f3f;
		font-size: 40rpx;
		font-weight: bold;
		padding-top: 44rpx;
	}
</style>
